<?php
/**
 * @author     Thibaut Cromphaut, Gaïtano Boeraeve, Matthias Mercy
 * @copyright  Copyright (c) 2011 memorygame
 */
class Application_Form_Login extends Zend_Form
{

    public function init()
    {

        // Veld 'E-mailadres'
        $this->addElement('text', 'email', array(
            'label'      => 'E-mailaddress:',
            'required'   => true,
            'filters'    => array('StringTrim'),
            'validators' => array('EmailAddress'),
        ));

        // Veld 'Wachtwoord'
        $this->addElement('password', 'password', array(
            'label'      => 'Password:',
            'required'   => true,
            'filters'    => array('StringTrim'),
        ));

        // Knop 'Inloggen'
        $this->addElement('submit', 'login', array(
            'label'      => 'Log in',
        ));

        // Boodschap
        $this->setDecorators(array(
            'FormElements',
            array('Description', array('placement' => 'prepend')),
            'Form'
        ));

        // CSRF-preventie (Cross-Site Request Forgery)
        /*$this->addElement('hash', 'no_csrf_login', array(
            'salt' => 'unique',
        ));*/

    }

}
